<?php
/**
 * 权限组模型
 */
namespace app\msgapi\model;

use think\model\concern\SoftDelete;

class AuthGroup extends BaseModel
{
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = 0;

    /**
     * 获取用户组已授权的导航id组
     * @param $groupId
     * @return array
     */
    public function getRulesShow($groupId): array
    {
        return explode(',',AuthGroup::where('id',$groupId)->value('rules_show'));
    }
}